<?php
namespace app\api\validate;

use think\Validate;

class RegisterValidate extends Validate
{
    protected $rule = [
        'account' => 'require',
        'mobile' => 'require',
        'password' => 'require',
        're_password' => 'require|confirm:password',
        'pay_password' => 'require'
    ];

    protected $message = [
        'account.require' => '姓名不能为空',
        'mobile.require' => '手机号码不能为空',
        'password.require' => '密码不能为空',
        're_password.require' => '确认密码不能为空',
        're_password.confirm' => '两次登录密码不一致',
        'pay_password.require' => '支付密码不能为空'
    ];

    protected $scene = [
        'index' => ['account','mobile','password','re_password','pay_password']
    ];
}
